﻿@page "/role"
@using Console = System.Console
@inject DialogService DialogService
@inject ToastService ToastService
@inject IDispatchService<string> DispatchService

@attribute [TabItemOption(Text = "角色管理", Icon = "fa-fw fa-solid fa-desktop")]

<EasyAdminTable TItem="RoleEntity" ShowExtendEditButtonCallback="@(entity => entity.RoleName != "管理员")"
            ShowExtendDeleteButtonCallback="@(entity => entity.RoleName != "管理员")">
    <TableColumns>
        <TableColumn @bind-Field="@context.RoleName" Filterable="true"></TableColumn>
    </TableColumns>
    <BeforeRowButtonTemplate Context="value">
        <TableCellButton Text="编辑菜单" OnClick="() => EditMenu(value.Id)"></TableCellButton>
    </BeforeRowButtonTemplate>
</EasyAdminTable>

